﻿using log4net.Core;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
    /// <summary>
    /// 日志类
    /// </summary>
    [Injection(InjectionType.Singleton)]
    public class Logger
    {
        /// <summary>
        /// 写入日志 Info
        /// </summary>
        /// <param name="value"></param>
        /// <param name="mark"></param>
        public void Info(string value, string mark = "")
        {
            value.Info(mark);
        }

        /// <summary>
        /// 写入日志 Debug
        /// </summary>
        /// <param name="value"></param>
        /// <param name="mark"></param>
        public void Debug(string value, string mark = "")
        {
            value.Debug(mark);
        }

        /// <summary>
        /// 写入日志 Error
        /// </summary>
        /// <param name="value"></param>
        /// <param name="mark"></param>
        public void Error(string value, string mark = "")
        {
            value.Error(mark);
        }

        /// <summary>
        /// 写入日志 Fatal
        /// </summary>
        /// <param name="value"></param>
        /// <param name="mark"></param>
        public void Fatal(string value, string mark = "")
        {
            value.Fatal(mark);
        }

        /// <summary>
        /// 写入日志 Warn
        /// </summary>
        /// <param name="value"></param>
        /// <param name="mark"></param>
        public void Warn(string value, string mark = "")
        {
            value.Warn(mark);
        }

        /// <summary>
        /// 写入日志 Info
        /// </summary>
        /// <param name="value"></param>
        /// <param name="exception"></param>
        /// <param name="mark"></param>
        public void Info(string value, Exception exception, string mark = "")
        {
            value.Info(exception,mark);
        }

        /// <summary>
        /// 写入日志 Debug
        /// </summary>
        /// <param name="value"></param>
        /// <param name="exception"></param>
        /// <param name="mark"></param>
        public void Debug(string value, Exception exception, string mark = "")
        {
            value.Debug(exception, mark);
        }

        /// <summary>
        /// 写入日志 Error
        /// </summary>
        /// <param name="value"></param>
        /// <param name="exception"></param>
        /// <param name="mark"></param>
        public void Error(string value, Exception exception, string mark = "")
        {
            value.Error(exception, mark);
        }

        /// <summary>
        /// 写入日志 Fatal
        /// </summary>
        /// <param name="value"></param>
        /// <param name="exception"></param>
        /// <param name="mark"></param>
        public void Fatal(string value, Exception exception, string mark = "")
        {
            value.Fatal(exception, mark);
        }

        /// <summary>
        /// 写入日志 Warn
        /// </summary>
        /// <param name="value"></param>
        /// <param name="exception"></param>
        /// <param name="mark"></param>
        public void Warn(string value, Exception exception, string mark = "")
        {
            value.Warn(exception, mark);
        }
    }
}
